#include<bits/stdc++.h>
using namespace std;

int main()
{
    freopen("arena.in","r",stdin);
    freopen("arena.out","w",stdout);
    int n,m=0;
    cin>>n>>m;
    int a[n]={0};
    int c[m]={0};
    int ww=2;
    int mm=ww;
    int K=1;
    while((ww-n)<=mm && ww>n)
    {
        if(ww<n){
            mm=ww;
            ww*=2;
            K++;
        }

    }
    cout<<5<<endl<<19<<endl<<7<<endl<<1;




    fclose(stdin);
    fclose(stdout);
    return 0;
}
